<template>
  <div id="updateDialog">
    <el-dialog class="box" title="测点信息" :visible.sync="updateDialogShow" :before-close="handleClose">
      <div class="content" >
        <el-row>
          <el-col :span="24"><div class="grid-content bg-purple line">
            <div class="tableList" >
              <div class="list1" v-for="table in this.pointInfo">
                <div class="leftTitle">
                {{table.fittings_name}}
                </div>
                <div class="rightContent" >
                <div class="list" v-for="one in table.station">
                <div  v-if="one.color === 0"><span style="color: #666">{{one.name}}</span></div>
                <div v-if="one.color === 1"><span style="color: #3FBEFC">{{one.name}}</span></div>
                </div>
                </div>
              </div>

            </div>
            <!--<div class="tableList" v-for="table in this.pointInfo">-->
              <!--<div class="leftTitle">-->
                <!--{{table.fittings_name}}-->
              <!--</div>-->
              <!--<div class="rightContent" >-->
                <!--<div class="list" v-for="one in table.station">-->
                  <!--<div  v-if="one.color === 0"><span style="color: #666">{{one.name}}</span></div>-->
                  <!--<div v-if="one.color === 1"><span style="color: #3FBEFC">{{one.name}}</span></div>-->
                <!--</div>-->
              <!--</div>-->
            <!--</div>-->
          </div>
          </el-col>
        </el-row>

      </div>
    </el-dialog>
  </div>
</template>

<script>
  import axios from 'axios'
  export default {
    props: {
      pInfoCid: ''
    },
    components: {
    },
    data() {
      return {
        restatus: '更新',
        updateDialogFalse: false,
        submitPoint: {
          access_token: window.localStorage.getItem('access_token'),
          type: 'equip_get_oid',
          cid: '1'
        },
        pointInfo: [],
        mainLeft: [],
        mainLeftCenter: [],
        mainSmallCenter: [],
        mainBigCenter: [],
        mainFCenter: [],
        mainZDCenter: []
      }
    },
    mounted() {
      console.log(this.pInfoCid)
      this.queryPointInfo()
    },
    created() {
      this.updateDialogShow = true
    },
    methods: {
      // 子组件传值
      handleClose() {
        const dialogShow = this.updateDialogFalse // 所需要传的值
        this.$emit('giveFalse', dialogShow) // 传值的参数
      },
      queryPointInfo() {
        this.submitPoint.cid = this.$route.query.cid
        axios.post('/equipmanage/v2', this.submitPoint, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          this.pointInfo = res.data.datas
          this.mainLeft = this.pointInfo[0].station
          this.mainLeftCenter = this.pointInfo[1].station
          this.mainSmallCenter = this.pointInfo[2].station
          this.mainBigCenter = this.pointInfo[3].station
          this.mainFCenter = this.pointInfo[4].station
          this.mainZDCenter = this.pointInfo[5].station
        })
      }
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  /*****************第一层弹窗*****************/
  .content{
    width: 960px;
    height: 450px;
    margin-top: 10px;
    margin-left: 10px;
    .tableList{
      width: 100%;
      height: 480px;
      /*border-bottom: 1px solid #EFEFEF;*/
      .list1{
        width: 160px;
        min-height: 480px;
        /*border-right: 1px solid #EFEFEF;*/
        float: left;
        padding-left: 10px;
        // font-weight: 400;
      }
      .leftTitle{
        width: 95px;
        height: 20px;
        line-height: 20px;
        font-weight: 600;
        color:#333333;
      }
      .rightContent{
        width: 150px;
        /*min-height: 100px;*/
        line-height: 40px;
        .list{
          width: 150px;
          height: 30px;
        }
      }
    }
  }
  .rightLine{
    font-size: 16px;
    color: #25B6C7;
    font-weight: bold;
    cursor: pointer;
  }
  .tableIcon{
    i{
      font-size: 22px;
    }
  }
  /deep/ .addEditIcon {
    color: #25B7C8;
    font-size: 16px;
    cursor: pointer;
  }
  /deep/ .el-range-editor--small.el-input__inner {
    height: 30px;
    width: 385px;
  }
  /deep/ .addSafeTable > .el-table__header-wrapper{
    height: 0px;
  }
  /*****************第一层弹窗*****************/
  /deep/ .box > .el-dialog{
    width: 1000px;
    height: 600px;
    overflow: auto;
    margin-top: 20vh !important;
    border-radius: 4px;
  }
  /*****************第一层弹窗头部*****************/
  /deep/ .box > .el-dialog > .el-dialog__header{
    width: 1000px;
    height: 39px;
    line-height: 43px;
    padding: 0;
    text-indent: 20px;
    font-weight: bolder;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background-color: #EFEFEF;
  }
  /deep/ .box > .el-dialog > .el-dialog__header > .el-dialog__headerbtn{
    top: 12px;
  }
  /deep/ .box > .el-dialog > .el-dialog__header > .el-dialog__headerbtn > i{
    font-size: 18px;
    font-weight: bolder;
  }
  /*****************第一层弹窗内容*****************/
  /deep/ .box > .el-dialog > .el-dialog__body{
    padding: 1px 0 0 10px ;
    height: 500px;
    line-height: 30px;
    overflow: auto;
    margin-top: 20px;
    margin-bottom: 20px;
  }
  /deep/ .box > .el-dialog > .el-dialog__body > .el-form > .el-form-item{
    margin-bottom: 0;
  }
  /deep/ .box > .el-dialog > .el-dialog__body > .el-form > .el-form-item > .el-form-item__label{
    color: #69727E;
    font-weight: normal;
  }
  /deep/ .box > .el-dialog > .el-dialog__body > .el-form > .el-form-item > .el-form-item__content > .el-input > .el-input__inner{
    width: 610px;
    height: 30px;
  }
  /*****************第一层弹窗底部*****************/
  /deep/ .box > .el-dialog > .el-dialog__footer{
    border-top: 1px solid #e3e6ee;
  }
  /*****************底部按钮*****************/
  /deep/ .dialog-footer{
    width: 100%;
    /*padding-top: 8px;*/
  }
  /deep/ .dialog-footer > .el-button{
    width: 80px;
    height: 30px;
    padding: 0;
  }
  /deep/ .el-input__inner {
    -webkit-appearance: none;
    background-color: #fff;
    background-image: none;
    border-radius: 4px;
    border: 1px solid #dcdfe6;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: #606266;
    display: inline-block;
    font-size: inherit;
    height: 30px;
    line-height: 30px;
    outline: 0;
    padding: 0 27px;
    -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
    transition: border-color .2s cubic-bezier(.645,.045,.355,1);
    width: 100%;
  }
  /deep/ .el-icon-minus {
    color: #D05133;
  }
  #updateDialog /deep/ .el-table tr {
    background-color: #F0F3F5;
  }
  #updateDialog /deep/  .el-table td {
    border-bottom: 10px solid #fff;
  }
  #updateDialog /deep/  .el-table--group::after, .el-table--border::after, .el-table::before {
    content: '';
    position: absolute;
    background-color: #fff;
    z-index: 1;
  }


</style>
